package com.g0dkar.leet.core.model;

import java.util.ArrayList;
import java.util.List;

/**
 * Represent a part of the system consisting of a collection of mappings (CRUD/Flow/Reports) that are accessible for a
 * group of users (role).
 * 
 * @author Daniel
 * @author Rafael M. Lins
 */
public class Section {
	
	private String name;
	private String displayName;
	private List<Mapping> mappings;
	private List<Role> roles;
	
	public Section() {
		mappings = new ArrayList<Mapping>();
		roles = new ArrayList<Role>();
	}
	
	public String getName() {
		return name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	public String getDisplayName() {
		return displayName != null ? displayName : name;
	}
	
	public void setDisplayName(String displayName) {
		this.displayName = displayName;
	}
	
	public List<Mapping> getMappings() {
		return mappings;
	}
	
	public void setMappings(List<Mapping> mappings) {
		this.mappings = mappings;
	}
	
	public List<Role> getRoles() {
		return roles;
	}
	
	public void setRoles(List<Role> roles) {
		this.roles = roles;
	}
	
}
